package com.boang.mapper;

import com.boang.entity.PO.Venue;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author 22567
* @description 针对表【venue】的数据库操作Mapper
* @createDate 2025-03-10 15:48:00
* @Entity com.boang.entity.PO.Venue
*/
public interface VenueMapper extends BaseMapper<Venue> {
    /**
     * 查询所有可用场地
     */
    @Select("SELECT * FROM venue WHERE status = '可预约'")
    List<Venue> selectAvailableVenues();

    /**
     * 根据ID查询场地
     */
    @Select("SELECT * FROM venue WHERE id = #{id}")
    Venue selectVenueById(Long id);

}




